#ifndef GAMEOVERSTATE_H
#define GAMEOVERSTATE_H
#include "Globals.h"
#include "Button.h"
#include "TextEdit.h"
#include "State.h"


class GameoverState : public sfge::State
{
    public:
        GameoverState(sf::RenderWindow* window, sfge::StateManager* mgr);
        ~GameoverState();
        void init();
        void cleanup();

        void update();
        void draw();
        void handle();

        void resume(){};
        void pause(){};

        static GameoverState* Instance(sf::RenderWindow* window, sfge::StateManager* mgr)
       	{
       	    if(gameoverState == NULL)
                gameoverState = new GameoverState(window, mgr);
            return gameoverState;
        }


    private:
        sf::Sprite cursorSprite;
        sf::Text gameoverText;
        sf::Text scoreText;
        Button* quitButton;
        Button* playAgainButton;
        TextEdit* nameEdit;

        void checkButtons(float x, float y);
        void clicked(float x, float y);

        static GameoverState* gameoverState;



};

#endif // GAMEOVERSTATE_H
